# coding=utf-8
from framework.base_page import BasePage
#订单详情页面一些操作
class EportsOrderDeailPage(BasePage):
    btn_edit_shipyard = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[2]/div/div/div[1]/div[1]/div[2]/div/a"
    btn_shipyard = "xpath=>//*[@id='subPort']/div/div"
    dropDown_shipyard = "xpath=>//input[@id='subPort']"
    btn = "xpath=>//*[@id='rcDialogTitle0']"
    btn_save_shipyard = "xpath=>/html/body/div[2]/div/div[2]/div/div[2]/div[2]/form/div[2]/button[2]"
    btn_edit_ATA = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[2]/div/div/div[1]/div[2]/div/span/div[3]/a"
    btn_ETB = "xpath=>//*[@id='berthTime']/div/input"
    btn_ETB_Now = "xpath=>/html/body/div[3]/div/div/div/div/div[2]/div[3]/span/a[1]"
    btn_ETD = "xpath=>//*[@id='departureTime']/div/input"
    btn_ETD_Now = "xpath=>/html/body/div[4]/div/div/div/div/div[2]/div[3]/span/a[1]"
    btn_save_ATA = "xpath=>/html/body/div[2]/div/div[2]/div/div[2]/div[3]/div/button[2]"    
    btn_edit_setPic = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[1]/div/span[2]/button"
    btn_save_setPic = "xpath=>/html/body/div[2]/div/div[2]/div/div[2]/div[3]/div/button[2]"   
    btn_add_service = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[2]/div/div/div[3]/div/div[3]/div[1]/div[2]/div[1]/button[1]"
    input_service_search = "xpath=>/html/body/div[2]/div/div[2]/div/div/div[1]/div/div/div/span/input"
    btn_service = "xpath=>/html/body/div[2]/div/div[2]/div/div/div[2]/div/div"
    btn_service_submit = "xpath=>/html/body/div[3]/div/div[2]/div/div/div[2]/div[2]/div/button[1]"
    btn_X = "xpath=>/html/body/div[2]/div/div[2]/div/div/div[1]/button/i"
    btn_add_customizedService = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[2]/div/div/div[3]/div/div[3]/div[1]/div[2]/div[1]/button[2]"
    input_ServiceName = "id=>customName"
    btn_customizedService_submit = "xpath=>/html/body/div[3]/div/div[2]/div/div/div[2]/div[2]/div/button[1]"
    btn_EstDA = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[2]/div/div/div[3]/div/div[1]/div/div/div/div/div[1]/div[2]/div/span[1]/div"
    btn_Report = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[2]/div/div/div[3]/div/div[1]/div/div/div/div/div[1]/div[3]/div"
    btn_bill = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[2]/div/div/div[3]/div/div[1]/div/div/div/div/div[1]/div[4]/div"
    btn_Payment = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[2]/div/div/div[3]/div/div[1]/div/div/div/div/div[1]/div[5]/div"

    def click_edit_shipyard(self):
        self.click(self.btn_edit_shipyard)
        self.sleep(2)

    def click_shipyard(self):
        self.click(self.btn_shipyard)
        self.sleep(2)

    def click_btn(self):
        self.click(self.btn)
        self.sleep(2)

    def dropDownType_shipyard(self,text):
        self.dropDownType(self.dropDown_shipyard,text)
        self.sleep(2)

    def click_edit_ATA(self):
        self.click(self.btn_edit_ATA)
        self.sleep(1)

    def click_ETB(self):
        self.click(self.btn_ETB)
        self.sleep(1)

    def click_ETB_Now(self):
        self.click(self.btn_ETB_Now)
        self.sleep(2)

    def click_ETD(self):
        self.click(self.btn_ETD)
        self.sleep(1)

    def click_ETD_Now(self):
        self.click(self.btn_ETD_Now)
        self.sleep(1)

    def click_edit_setPic(self):
        self.click(self.btn_edit_setPic)
        self.sleep(2)

    def click_save_shipyard(self):
        self.click(self.btn_save_shipyard)
        self.sleep(2)

    def click_save_ATA(self):
        self.click(self.btn_save_ATA)
        self.sleep(2)

    def click_save_setPic(self):
        self.click(self.btn_save_setPic)
        self.sleep(2)

    def click_add_service(self):
        self.click(self.btn_add_service)
        self.sleep(2)

    def type_service_search(self,text):
        self.type(self.input_service_search,text)
        self.sleep(2)

    def click_service(self):
        self.click(self.btn_service)
        self.sleep(2)

    def click_service_submit(self):
        self.click(self.btn_service_submit)
        self.sleep(2)

    def click_X(self):
        self.click(self.btn_X)
        self.sleep(2)

    def click_add_customizedService(self):
        self.click(self.btn_add_customizedService)
        self.sleep(2)

    def type_ServiceName(self,text):
        self.type(self.input_ServiceName,text)
        self.sleep(2)

    def click_customizedService_submit(self):
        self.click(self.btn_customizedService_submit)
        self.sleep(2)

    def click_EstDA(self):
        self.click(self.btn_EstDA)
        self.sleep(2)

    def click_Report(self):
        self.click(self.btn_Report)
        self.sleep(2)

    def click_bill(self):
        self.click(self.btn_bill)
        self.sleep(2)

    def click_Payment(self):
        self.click(self.btn_Payment)
        self.sleep(2)

